<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->
<head>
    @include('layouts.admin.header')
    <link rel="stylesheet" type="text/css" href="/css/plugins/webuploader/webuploader.css">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{{$title}}</h5>
                </div>
                <div class="ibox-content">
                    <form method="get" class="form-horizontal">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">文章标题：</label>
                            <div class="col-sm-3">
                                <input type="text" name="" class="form-control" placeholder="请输标题">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">文章副标题：</label>
                            <div class="col-sm-3">
                                <input type="text" name="" class="form-control" placeholder="请输文章副标题">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">排序号：</label>
                            <div class="col-sm-3">
                                <input type="text" name="" class="form-control" placeholder="请输排序号"> <span
                                        class="help-block m-b-none">文章按从小到大排列</span>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">文章分类：</label>
                            <div class="col-sm-4">
                                <select class="form-control" name=""></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">上传照片：</label>
                            <div class="col-sm-3">
                                <div id="filePicker"></div>
                                <div id="preview">

                                </div>
                                <input name="headimg" class="form-control" type="hidden">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12 col-sm-offset-3">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="submit">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/js/plugins/webuploader/webuploader.min.js"></script>
<script>
    function uploadSuccess(file,response){
        var msg = eval(response);
        if(parseInt(msg.code) == 0){
            console.log(msg);
            $("#preview").html('<img src="__IMAGES__/'+msg.path+'" style="height: 100px;" class="upload_qrcode"/>');
            $("[name=headimg]").val(msg.path);
        }else{
            alertError(msg.msg);
        }
    }
    bind_uploder("#filePicker","上传照片","{{url('admin/imageUpload')}}",'test',uploadSuccess);
</script>
</html>
